package com.mysoft.gfyx.clue.mip.dto;

import com.mysoft.framework.common.exception.BusinessLogicException;
import lombok.Data;

@Data
public class CustomersPoolRequestDto extends SearchBaseRequestDto {
    private String provinceCode;
    private String areaCategoryCode;

    //private String companyType;

    private String companyTag;

    private String assignStatus;

    private String customerName;

    private String responsiblePerson;

    private Integer page;

    private Integer pageSize;

    private Integer offset;

    private Integer isNeedLimit = 1;

    private String developerActivityLabel;
    private String isYcgCertification;
    private String isYcgOfflineBusinessConnect;

    private String companyType;

    private String developerTop100Label;
    private String isNewAreaExpandLabel;
    private String isNewDecorateExpandLabel;
    private String isNewLandUsageExpandLabel;
    private String highProjectCustomersLabel;


    protected void setFilterByField(String field, String operatorType, Object value) {
        switch (field) {
            case "companyLevelTag":
                switch (value.toString()) {
                    case "developer_activity_label":
                        this.setDeveloperActivityLabel("活跃");
                        break;
                    case "is_ycg_certification":
                        this.setIsYcgCertification("平台认证");
                        break;
                    case "is_ycg_offline_business_connect":
                        this.setIsYcgOfflineBusinessConnect("供需对接会");
                        break;
                    default:
                        throw new BusinessLogicException("未定义的标签" + value.toString());
                }
                break;
            case "tagsSet":
                switch (value.toString()) {
                    case "developer_top_100_label":
                        this.setDeveloperTop100Label("地产百强");
                        break;
                    case "is_new_decorate_expand_label":
                        this.setIsNewDecorateExpandLabel("新精装客群");
                        break;
                    case "is_new_land_usage_expand_label":
                        this.setIsNewLandUsageExpandLabel("新住宅客群");
                        break;
                    case "is_new_area_expand_label":
                        this.setIsNewAreaExpandLabel("新区域拓展");
                        break;
                    case "high_project_customers_label":
                        this.setHighProjectCustomersLabel("高端项目客群");
                        break;
                    default:
                        throw new BusinessLogicException("未定义的标签" + value.toString());
                }
                break;
            default:
                this.dynamicSetProperty(field, value);
        }
    }


}
